@(name: String)
    @config.main(name) {
        <div class="body-box">
            <div class="page-box">

                @config.subTitle(name)

                <div class="main-body" >

                    <table class="table table-bordered table-hover" id="table"

                    style="width: 100%;
                        background-color: white;
                        text-align: center;"></table>
                </div>
            </div>
        </div>


        <script>


                $(function () {
                    $.post("@routes.BrowseController.getTableHeader(name)", (data) => {
                        let columns = []

                        $.each(data, (i, v) => {
                            columns.push({
                                field: v,
                                title: v.replaceAll("_", " "),
                                sortable: true,
                                searchType: "text",
                                formatter: function (value) {
                                    if (i === 0) {
                                        return `<a href="/SCED/browse/@name/${v}/${value}" target="_blank">${value}</a>`
                                    } else {
                                        if (value.includes("http://")) {
                                            return `<a href="${value}" target="_blank">${value}</a>`
                                        } else {
                                            return value
                                        }
                                    }
                                }
                            })
                        })

                        $("#table").bootstrapTable({
                            method: 'post',
                            url: "@routes.BrowseController.getTableData(name)",
                            sidePagination: "server",
                            pageNumber: 1,
                            pagination: true,
                            pageList: [10],

                            contentType: "application/x-www-form-urlencoded",
                            advancedSortable: true,
                            columns: columns
                        })

                    })


                })




        </script>
    }